#ifndef app_h
#define app_h

#include "xml.h"
#include "thread.h"
#include "data_stream.h"
#include "data_deal.h"
#include "service.h"
#include "task_manager.h"

class CApp : public CThread{
public:
	CApp();
	~CApp();
	void initialize();
	void run();

protected:
	void execute();

private:
	CRITICAL_SECTION m_cs;
	char * m_FileName;
	XMLNode m_AppNode;
	XMLNode m_MainNode;

	CTaskManager * m_TaskManager;
	CDataStream * m_DataStream;
	CDataDeal * m_DataDeal;
	CService * m_Service;

public:
	void newTask(char * n_Task);
};

#endif
